package com.core.model.lxf;

import com.core.model.AbstractEntity;

import javax.persistence.*;

/**
 * Created with IntelliJ IDEA.
 * User: xf
 * Date: 2017-08-08
 * Time: 20:47
 * To change this template use Editor | File and Code Templates.
 */
@Entity
@Table(name = "sec_kill_order")
public class SecKillOrder extends AbstractEntity {

    private String consumer;

    @OneToOne
    @JoinColumn(name = "good_id")
    private SecKillGoods goodsId;

    private Integer num;

    public SecKillOrder() {
    }

    public SecKillOrder(String consumer, SecKillGoods goodsId, Integer num) {
        this.consumer = consumer;
        this.goodsId = goodsId;
        this.num = num;
    }

    public String consumer() {
        return consumer;
    }

    public SecKillGoods goodsId() {
        return goodsId;
    }

    public Integer num() {
        return num;
    }
}
